<!DOCTYPE html>
<html lang="zh_CN" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns: xmlns="http://www.w3.org/1999/html"
      xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <tr v-for="(i,brand) in brands" align="center">
        <td>{{i+1}}</td>
        <td>{{brand.username}}</td>
        <td>{{brand.password}}</td>
        <td>{{brand.address}}</td>
        <td>{{brand.birthday}}</td>
    </tr>
</div>
</body>
<script src="js/vue.js"></script>
<script>
    //创建vue对象,el表示绑定id的
    new Vue({
        el: "#app",
        data() {
            return {
                brands:[]
            }
        },
        mounted(){
            //页面加载完成后,发送异步请求,显示数据
            var _this = this;//获取vue对象
            axios({
                method: "get",
                url: "http://localhost:8080/userService/findAll"
            }).then(function (resp){
                _this.brands = resp.data;
            })
        }
    })
</script>
</html>